<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/ph_sh_update/'.$cateid)?>">

	<h3>菲律宾上海领区申请表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  
		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />
			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td colspan="5">TO BE ACCOMPLISHED IN ENGLISH必须用英文填写</td>
           
        </tr>
        <tr class="even">
            <td>Surname/姓</td>
            <td><input type="text" name="surname" value="<?= @$info->surname?>" /></td>
            <td>&nbsp;</td>
            <td>Given Name/名</td>
            <td><input type="text" name="firstname" value="<?= @$info->firstname?>" /></td>
        </tr>
        <tr class="odd">
            <td>Middle Name/中间名</td>
            <td><input type="text" name="middlename" value="<?= @$info->middlename?>" /></td>
            <td>&nbsp;</td>
            <td>Sex/性别</td>
            <td><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />
              Male / 男
                <input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />
              Female / 女</td>
        </tr>
        <tr class="even">
            <td>Date of Birth/出生日期</td>
            <td><input type="text" name="birth" value="<?= @$info->birth?>" /></td>
            <td>&nbsp;</td>
            <td>Citizenship/国籍</td>
            <td><input type="text" name="citizenship" value="<?= @$info->citizenship?>" /></td>
        </tr>
        <tr class="odd">
            <td>Place of Birth/ 出生地</td>
            <td><input type="text" name="birth_place" value="<?= @$info->birth_place?>" /></td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
        <tr class="even">
          <td>Civil Status/ 婚姻状况:</td>
		  <td colspan="4">
		  <input type="radio" name="marital_status" value="1" <?= (@$info->marital_status==1)?'checked':''?>/>
		    Single/ 未婚 
		    <input type="radio" name="marital_status" value="2" <?= (@$info->marital_status==2)?'checked':''?>/>
Married/ 已婚 
<input type="radio" name="marital_status" value="3" <?= (@$info->marital_status==3)?'checked':''?>/>
Widowed/ 寡鳏 
<input type="radio" name="marital_status" value="4" <?= (@$info->marital_status==4)?'checked':''?>/>
Separated/ 分居 
<input type="radio" name="marital_status" value="5" <?= (@$info->marital_status==5)?'checked':''?>/>
Divorced/ 离婚<br />
If married, state name and address of the spouse/ 如果已婚， 请陈述配偶姓名及地址:<br />
Name 
<input type="text" name="spouse_name" value="<?= @$info->spouse_name?>" /> Address 
<input name="spouse_address" type="text" value="<?= @$info->spouse_address?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
            <td colspan="5">Applicant’s Address/申请人住址 
              <input name="app_address" type="text" value="<?= @$info->app_address?>" style="width:500px" />  
              &nbsp;Since/自 
              住 <input type="text" name="app_since" value="<?= @$info->app_since?>" id="app_since" />
              <br />
              Occupation/ 职业 
              <input type="text" name="occupation" value="<?= @$info->occupation?>" />
                &nbsp;Since/ 自 <input type="text" name="occupation_since" value="<?= @$info->occupation_since?>" id="occupation_since" />
                <br />
              Telephone No/ 电话 
              <input type="text" name="app_tel" value="<?= @$info->app_tel?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">Name and ages of Children, if any/ 如果有， 请陈述小孩的姓名及年龄:<br />
              <textarea name="child"><?= @$info->child?></textarea></td>
        </tr>
        <tr class="odd">
            <td colspan="5">Father’s Name/父亲姓名
              <input type="text" name="father_name" value="<?= @$info->father_name?>" />
&nbsp;&nbsp;&nbsp;Mother’s Name/母亲姓名
<input type="text" name="mother_name" value="<?= @$info->mother_name?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">Description of Passport or Travel Document/ 护照或旅行证件说明:<br />
              Type/ 种类: 
              <input type="text" name="travel_document_type" value="<?= @$info->travel_document_type?>"/>  
              &nbsp;&nbsp;Number/号码: 
              <input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" /> 
              &nbsp;&nbsp;Issued by/ 签发地:  
              <input type="text" name="travel_document_issue_place" value="<?= @$info->travel_document_issue_place?>" />
              <br />
              Date of Issue/ 签发日期: 
              <input type="text" name="travel_document_issue_date" value="<?= @$info->travel_document_issue_date?>" id="travel_document_issue_date" /> 
              &nbsp;&nbsp;Valid until/ 有效期至: 
              <input type="text" name="travel_document_valid_date" value="<?= @$info->travel_document_valid_date?>" id="travel_document_valid_date"/></td>
        </tr>
		 <tr class="odd">
            <td colspan="5">Port of Entry/ 入境口岸: 
              <input type="text" name="entry_port" value="<?= @$info->entry_port?>" />
&nbsp;&nbsp;Purpose of Entry/ 入境目的: 
<input type="text" name="entry_purpose" value="<?= @$info->entry_purpose?>" />
<br />
Length of Stay/ 停留多久: 
<input type="text" name="stay_length" value="<?= @$info->stay_length?>" /></td>
		 </tr>
        <tr class="even">
            <td colspan="5">Other persons travelling with the Applicants under the same Passport or Travel Document:<br/>
是否有其他人与申请人一起使用同一本护照或旅行证件出境
  <input name="other_person" type="text" value="<?= @$info->other_person?>" style="width:500px"/></td>
            
        </tr>		
        <tr class="odd">
            <td>Address in the Philippines<br />
              在菲 律 宾 的 地 址:</td>
            <td colspan="4"><input name="ph_address" type="text" value="<?= @$info->ph_address?>" style="width:500px" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">References in the Philippines/在菲律宾的联系人<br />
              1. Name/姓名 
               <input type="text" name="contacter1_name" value="<?= @$info->contacter1_name?>" /> &nbsp;&nbsp;Address/地址 
              <input name="contacter1_address" type="text" value="<?= @$info->contacter1_address?>" style="width:300px" />
              <br />
              2. Name/姓名
               <input type="text" name="contacter2_name" value="<?= @$info->contacter2_name?>" />
			&nbsp;&nbsp;Address/地址
			<input name="contacter2_address" type="text" value="<?= @$info->contacter2_address?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
            <td>Destination after the Philippines<br />
              离开菲律宾以后的目的地:</td>
			<td colspan="4"><input name="ph_after" type="text" value="<?= @$info->ph_after?>" style="width:500px"/></td>
        </tr>
		<tr class="even">
            <td colspan="5">Supporting documents submitted and offered for inspection of visa applications:
              
              所提交的帮助申请签证的文件名称<br />
		1. 
		<input name="document1" type="text" value="<?= @$info->document1?>"  /> 
		&nbsp;&nbsp;2. 
		<input name="document2" type="text" value="<?= @$info->document2?>" />
		<br />
		3.
		<input name="document3" type="text" value="<?= @$info->document3?>" />
		&nbsp;&nbsp;4.
		<input name="document4" type="text" value="<?= @$info->document4?>" />
		<br />
		5.
		<input name="document5" type="text" value="<?= @$info->document5?>" />
		&nbsp;&nbsp;6.
		<input name="document6" type="text" value="<?= @$info->document6?>" />
			</td>
        </tr>
        <tr class="odd">
		    <td>Were you ever refused any kind of 
		      Philippine visa before and denied admission 
		      into or deported
from the Philippine? If yes, 
state circumstances <br />
曾有否任何一种菲律宾签证被拒签过，
甚至拒绝入境或被驱逐出境，
如有，请说明:</td>
            <td colspan="4"><textarea name="refuse_reason"><?= @$info->refuse_reason?></textarea></td>
        </tr>

        <tr class="odd">
            <td colspan="5">I understand that I may only enter the Philippines at the Port of Entry designated by the Philippine<br />
              Immigration Authorities and under the condition imposed by those authorities.<br />
              我明白我仅可以在菲律宾移民事务所所指定的入境口岸入境以及在遵守移民局的规定下入境。<br />
              I solemnly swear that the foregoing statements are true to the best of my knowledge.<br />
              我在此声明以上内容所实。</td>
        </tr>
        
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
	$("#form").validate({
		rules: {
			surname:"required",
			firstname:"required",
			citizenship:"required",
			sex:"required",
			birth_place:"required",
			birth:"required",
			marital_status:"required",
			travel_document_num:"required",
			travel_document_issue_place:"required",
			travel_document_issue_date:"required",
			travel_document_valid_date:"required",
			travel_document_type:"required"
		}
	});
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'dd/mm/yy',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);

	$("#birth").datepicker();
	$("#app_since").datepicker();
	$("#occupation_since").datepicker();
	$("#travel_document_issue_date").datepicker();
	$("#travel_document_valid_date").datepicker();
	

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>